{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<HeaderCredentials @role={{this.role}} @scope={{this.scope}} />
<Toolbar>
  <ToolbarActions>
    {{#if this.model.updatePath.canUpdate}}
      <ConfirmAction
        @buttonText="Delete role"
        class="toolbar-button"
        @buttonColor="secondary"
        @onConfirmAction={{this.deleteRole}}
        @confirmMessage="Are you sure you want to delete {{this.model.id}}?"
      />
      <div class="toolbar-separator"></div>
    {{/if}}
    {{#if this.model.updatePath.canUpdate}}
      <ToolbarLink @route="role.edit" @models={{array this.scope this.role}} data-test-kmip-link-edit-role>
        Edit role
      </ToolbarLink>
    {{/if}}
  </ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-sideless is-shadowless">
  <FieldGroupShow @model={{this.model}} @showAllFields={{false}} />
  <div class="box is-fullwidth is-shadowless">
    <h2 class="title is-5">
      Allowed operations
    </h2>
    <OperationFieldDisplay @model={{this.model}} />
  </div>
</div>